﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    
    <Style x:Key="GlassButton" TargetType="{x:Type Button}">
    <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="OverridesDefaultStyle" Value="True"/>
        <Setter Property="Background" Value="#FF00388D" />
        <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="{x:Type Button}">
                <ControlTemplate.Resources>
                    <Storyboard x:Key="Storyboard1">
                        <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="glow">
                            <SplineColorKeyFrame KeyTime="0:0:0.01" Value="#FF00246A"/>
                        </ColorAnimationUsingKeyFrames>
                        <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="glow">
                            <SplineColorKeyFrame KeyTime="0:0:0.01" Value="#DA002060"/>
                        </ColorAnimationUsingKeyFrames>
                        <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="glow">
                            <SplineColorKeyFrame KeyTime="0:0:0.01" Value="#4B001B50"/>
                        </ColorAnimationUsingKeyFrames>
                        <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="RefractionLayer">
                            <SplineColorKeyFrame KeyTime="0:0:0.01" Value="#FF0042C4"/>
                        </ColorAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="grid">
                            <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                            <SplineDoubleKeyFrame KeyTime="0:0:0.01" Value="0.9"/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="grid">
                            <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                            <SplineDoubleKeyFrame KeyTime="0:0:0.01" Value="0.9"/>
                        </DoubleAnimationUsingKeyFrames>
                    </Storyboard>
                </ControlTemplate.Resources>
                <Grid x:Name="grid" RenderTransformOrigin="0.5,0.5">
                    <Grid.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform/>
                            <SkewTransform/>
                            <RotateTransform/>
                            <TranslateTransform/>
                        </TransformGroup>
                    </Grid.RenderTransform>
                    <!-- Background Layer -->
                    <Ellipse Fill="{TemplateBinding Background}"/>
                    <!-- Refraction Layer -->
                    <Ellipse x:Name="glow">
                        <Ellipse.Fill>
                            <RadialGradientBrush>
                                <GradientStop Color="#FF74C2FF" Offset="0.009"/>
                                <GradientStop Offset="0.922"/>
                                <GradientStop Color="#C463BBFF" Offset="0.397"/>
                            </RadialGradientBrush>
                        </Ellipse.Fill>
                    </Ellipse>
                    <Ellipse x:Name="RefractionLayer" Margin="0,-1,0,1">
                        <Ellipse.Fill>
                            <RadialGradientBrush GradientOrigin="0.496,1.052">
                                <RadialGradientBrush.RelativeTransform>
                                    <TransformGroup>
                                        <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.5" ScaleY="1.5"/>
                                        <TranslateTransform X="0.02" Y="0.3"/>
                                    </TransformGroup>
                                </RadialGradientBrush.RelativeTransform>
                                <GradientStop Offset="0.776" Color="#00000000"/>
                                <GradientStop Offset="0.328" Color="#D23CB9F1"/>
                                <GradientStop Color="#9F3CB9F1" Offset="0.526"/>
                            </RadialGradientBrush>
                        </Ellipse.Fill>
                    </Ellipse>
                    <ContentPresenter Margin="0,2,0,0" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    <!-- Reflection Layer -->
                    <Path x:Name="ReflectionLayerOriginal" VerticalAlignment="Top" Stretch="Fill" Margin="2,0.798,2,0">
                        <Path.RenderTransform>
                            <ScaleTransform ScaleY="0.5" />
                        </Path.RenderTransform>
                        <Path.Data>
                            <PathGeometry>
                                <PathFigure IsClosed="True" StartPoint="98.999,45.499">
                                    <BezierSegment Point1="98.999,54.170" Point2="89.046,52.258" Point3="85.502,51.029"/>
                                    <BezierSegment
                                    IsSmoothJoin="True"
                                    Point1="75.860,47.685"
                                    Point2="69.111,45.196"
                                    Point3="50.167,45.196"/>
                                    <BezierSegment Point1="30.805,45.196" Point2="20.173,47.741" Point3="10.665,51.363"/>
                                    <BezierSegment
                                    IsSmoothJoin="True"
                                    Point1="7.469,52.580"
                                    Point2="1.000,53.252"
                                    Point3="1.000,44.999"/>
                                    <BezierSegment Point1="1.000,39.510" Point2="0.884,39.227" Point3="2.519,34.286"/>
                                    <BezierSegment
                                    IsSmoothJoin="True"
                                    Point1="9.106,14.370"
                                    Point2="27.875,0"
                                    Point3="50,0"/>
                                    <BezierSegment Point1="72.198,0" Point2="91.018,14.466" Point3="97.546,34.485"/>
                                    <BezierSegment
                                    IsSmoothJoin="True"
                                    Point1="99.139,39.369"
                                    Point2="98.999,40.084"
                                    Point3="98.999,45.499"/>
                                </PathFigure>
                            </PathGeometry>
                        </Path.Data>
                        <Path.Fill>
                            <LinearGradientBrush EndPoint="0.5,1" MappingMode="RelativeToBoundingBox" StartPoint="0.5,0">
                                <GradientStop Color="#CCFFFFFF"/>
                                <GradientStop Color="#21FFFFFF" Offset="0.996"/>
                                <GradientStop Color="#71FFFFFF" Offset="0.647"/>
                                <GradientStop Color="#5BFFFFFF" Offset="0.819"/>
                            </LinearGradientBrush>
                        </Path.Fill>
                    </Path>
                    <Path Name="goodBottomRef"
						Data="M0,0 L0.11224225,0.34572029 C2.3168908,6.8606453 8.4810024,11.550188 15.740415,11.550188 22.999828,11.550188 29.16394,6.8606453 31.368589,0.34572029 L31.480829,5.7220459E-06 31.415351,0.34175682 C29.923412,7.6326866 23.472402,13.117199 15.740415,13.117199 8.0084291,13.117199 1.5574185,7.6326866 0.065477937,0.34175682 z"
						 Margin="0.26,0" RenderTransformOrigin="0.5,0.95" Stretch="Fill" VerticalAlignment="Bottom">
                        <Path.RenderTransform>
                            <ScaleTransform ScaleX="0.92" ScaleY="0.41" />
                        </Path.RenderTransform>
                        <Path.Fill>
                            <LinearGradientBrush EndPoint="0.5,1" MappingMode="RelativeToBoundingBox" StartPoint="0.5,0">
                                <GradientStop Color="#9FB8E9FF" Offset="1"/>
                                <GradientStop Color="#21CCEFFF" Offset="0.004"/>
                                <GradientStop Color="#52CCEFFF" Offset="0.353"/>
                                <GradientStop Color="#3DDBF4FF" Offset="0.181"/>
                            </LinearGradientBrush>
                        </Path.Fill>
                    </Path>
                    <!-- ContentPresenter -->


                </Grid>
                <ControlTemplate.Triggers>
                    <Trigger Property="IsMouseOver" Value="True">
                        <Setter Property="Fill" TargetName="glow">
                            <Setter.Value>
                                <RadialGradientBrush>
                                    <GradientStop Color="#FFBAD1FF" Offset="0"/>
                                    <GradientStop Offset="1"/>
                                    <GradientStop Color="#F081ABFF" Offset="0.78"/>
                                </RadialGradientBrush>
                            </Setter.Value>
                        </Setter>
                    </Trigger>
                    <Trigger Property="IsPressed" Value="True">
                        <Trigger.ExitActions>
                            <RemoveStoryboard BeginStoryboardName="Storyboard1_BeginStoryboard"/>
                        </Trigger.ExitActions>
                        <Trigger.EnterActions>
                            <BeginStoryboard x:Name="Storyboard1_BeginStoryboard" Storyboard="{StaticResource Storyboard1}"/>
                        </Trigger.EnterActions>
                    </Trigger>
                </ControlTemplate.Triggers>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>






    <ControlTemplate x:Key="GlassButton2" TargetType="{x:Type Button}">
        <ControlTemplate.Resources>
            <Storyboard x:Key="Timeline1">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="glow" Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1"/>
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="Timeline2">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="glow" Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
        </ControlTemplate.Resources>
        <Border BorderBrush="#FFFFFFFF" BorderThickness="0" CornerRadius="4,4,4,4">
            <Border x:Name="border" Background="#7F000000" BorderBrush="#FF000000" BorderThickness="1,1,1,1" CornerRadius="4,4,4,4">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="0.507*"/>
                        <RowDefinition Height="0.493*"/>
                    </Grid.RowDefinitions>
                    <Border Opacity="0" HorizontalAlignment="Stretch" x:Name="glow" Width="Auto" Grid.RowSpan="2" CornerRadius="4,4,4,4">
                        <Border.Background>
                            <RadialGradientBrush>
                                <RadialGradientBrush.RelativeTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="1.702" ScaleY="2.243"/>
                                        <SkewTransform AngleX="0" AngleY="0"/>
                                        <RotateTransform Angle="0"/>
                                        <TranslateTransform X="-0.368" Y="-0.152"/>
                                    </TransformGroup>
                                </RadialGradientBrush.RelativeTransform>
                                <GradientStop Color="#B28DBDFF" Offset="0"/>
                                <GradientStop Color="#008DBDFF" Offset="1"/>
                            </RadialGradientBrush>
                        </Border.Background>
                    </Border>
                    <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Width="Auto" Grid.RowSpan="2"/>
                    <Border HorizontalAlignment="Stretch" Margin="0,0,0,0" x:Name="shine" Width="Auto" CornerRadius="4,4,0,0">
                        <Border.Background>
                            <LinearGradientBrush EndPoint="0.494,0.889" StartPoint="0.494,0.028">
                                <GradientStop Color="#99FFFFFF" Offset="0"/>
                                <GradientStop Color="#33FFFFFF" Offset="1"/>
                            </LinearGradientBrush>
                        </Border.Background>
                    </Border>
                </Grid>
            </Border>
        </Border>
        <ControlTemplate.Triggers>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Opacity" TargetName="shine" Value="0.4"/>
                <Setter Property="Background" TargetName="border" Value="#CC000000"/>
                <Setter Property="Visibility" TargetName="glow" Value="Hidden"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource Timeline1}"/>
                </Trigger.EnterActions>
                <Trigger.ExitActions>
                    <BeginStoryboard x:Name="Timeline2_BeginStoryboard" Storyboard="{StaticResource Timeline2}"/>
                </Trigger.ExitActions>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
</ResourceDictionary>